package org.xi.dsaa;


import java.lang.reflect.InvocationTargetException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    private static final Pattern pattern = Pattern.compile("\"hdfs_path\":[\\W]*\"[^\"]+");

    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException {

        Matcher m = pattern.matcher("{\"hdfs_path\":\"/job/datax/export/saos_crm_crm_cs_ivr_dw_hour-hdfs2mysql.sql\"");
        if (m.find()) {
            String path = m.group(0);
            int index = path.lastIndexOf("\"");
            if (index > "hdfs_path".length() + 2) {
                System.out.println("Found value: " + path.substring(index + 1));
            }
        }


//        list.add(1);
//        list.add(2);
//        list.add(3);
//        System.out.println(list);
//        System.out.println(tree);
//        BigDecimal i1 = new BigDecimal(0);
//        i1 = i1.add(new BigDecimal(10));
//        System.out.println(i1);
//        JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
//
//
//        Constructor constructor = Class.forName("org.xi.dsaa.Test").getConstructor(String.class);
//        Test test = (Test) constructor.newInstance("test");
//        System.out.println(test);
    }

}

class Test {

    public Test(String name) {
        this.name = name;
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Test{" +
                "name='" + name + '\'' +
                '}';
    }
}